#!/bin/bash

NAMEBACK="peter/huaxrobot"
VERSION="1.0.2"


#清空环境
docker kill $(docker ps | grep "peter" | awk '{print $1}')
docker rmi $(docker images | grep "peter" | awk '{print $3}')

#构建
docker build -t ${NAMEBACK}:${VERSION} -f ./docker/huaxrobot.Dockerfile .
docker tag ${NAMEBACK}:${VERSION} ${NAMEBACK}:latest


#运行
docker run -d -p 3001:3001 --rm ${NAMEBACK}:${VERSION} 


